﻿@using KPIS.GERP.Models.ICM
@model BidderCollateral

@{
    Layout = "~/Views/Shared/_EmptyLayout.cshtml";  
    ViewBag.Title = "หลักประกัน";
    ViewBag.Descr = "แก้ไขข้อมูล" + ViewBag.Title;
}

@using (Html.BeginForm("Edit", "BidderCollateral", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ActionLink("กลับไปหน้าแสดงข้อมูลทั้งหมด", "Index", new { BidderId = Model.BidderId }, new { @class = "btn btn-gray button-standard-width btn-small", role="button" })
        @Html.ButtonSubmit()
        @Html.ButtonCancel(new { Id = Model.BidderColId })
    </div>
    
    @Html.ValidationSummary(true, KPIS.GERP.Models.Class.ValidateText.RequiredField, new { @class = "alert alert-error" })
    @Html.Partial("_EditorForm")
}

@section scripts
{
    <script>
        $("form").submit(function (e) {
            e.preventDefault();
            var currentForm = this;
            bootbox.confirm(function (result) {
                if (result) {
                    currentForm.submit();
                }
            });
        });
       
        //$("#ColStatusId").attr('readonly', 'true');
    </script>
}